from pydantic import BaseModel, Field
import random


class Node(BaseModel):
    id_: str = Field(alias="id")
    name: str
    symbolSize: float = 30.0
    x: float = random.random()
    y: float = random.random()
    value: str
    category: int


class Link(BaseModel):
    source: str
    target: str


class Category(BaseModel):
    name: str


class Graph(BaseModel):
    nodes: list[Node]
    links: list[Link]
    categories: list[Category]
